'use strict';

exports.update = async ctx => {
  ctx.validate({
    home_videos: {
      type: 'array',
      rule: {
        type: 'string',
      },
    },
    home_icon: {
      type: 'url',
    },
    home_title: {
      type: 'string',
    },
    home_jianli: {
      type: 'url',
    },
    abouts: {
      type: 'string',
    },
    expertise: {
      type: 'string',
    },
    experience_show: {
      type: 'string',
    },
    works_show: {
      type: 'string',
    },
  });
  ctx.validate({
    id: {
      type: 'mongo-id',
    },
  }, ctx.params);
  ctx.sendSuccess(await ctx.service.me.update());
};
